#include "StdAfx.h"
#include "ConsumerNextFollowupModel.h"


ConsumerNextFollowupModel::ConsumerNextFollowupModel(void)
{
	m_id = 0;
	m_consumerID = 0;
	m_nextLoanTm = 0;
}

ConsumerNextFollowupModel::~ConsumerNextFollowupModel(void)
{
}

void ConsumerNextFollowupModel::parseFromJson(Json::Value& jsonData)
{
	CUtils::getJsonStringField(jsonData, "loanBankName", m_loanBankName);
	CUtils::getJsonStringField(jsonData, "loanMoney", m_loanMoney);
	CUtils::getJsonStringField(jsonData, "loanInterestRate", m_loanInterestRate);
	CUtils::getJsonStringField(jsonData, "debtRatio", m_debtRatio);
	if (!jsonData["id"].isNull())
	{
		m_id = jsonData["id"].asInt();
	}
	if (!jsonData["consumerID"].isNull())
	{
		m_consumerID = jsonData["consumerID"].asInt();
	}
	if (!jsonData["nextLoanTm"].isNull())
	{
		m_nextLoanTm = jsonData["nextLoanTm"].asInt64();
	}
}
